package com.starlink.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.starlink.common.PageInfoTwo;
import com.starlink.model.domain.ShoppingCartDO;
import com.starlink.model.request.ShoppingCartRequest;
import com.starlink.model.vo.ShoppingCartVO;

import java.util.List;

/**
 * @author zhanghong
 */
public interface ShoppingCartService extends IService<ShoppingCartDO> {

    /**
     * 根据主键查询
     * @param id
     * @return
     */
    ShoppingCartVO getByKey(long id);
    /**
     * 分页查询，手动分页
     * @param request
     * @return
     */
    PageInfoTwo<ShoppingCartVO> pageQuery(ShoppingCartRequest request);
    /**
     * 列表查询
     * @param request
     * @return
     */
    List<ShoppingCartVO> listQuery(ShoppingCartRequest request);
    /**
     * 新增
     * @param request
     * @return
     */
    Boolean add(ShoppingCartRequest request);
    /**
     * 根据主键更新
     * @param request
     * @return
     */
    Boolean updateByKey(ShoppingCartRequest request);
    /**
     * 根据主键删除
     * @param ids
     * @return
     */
    Boolean deleteByIds(String ids);

    /**
     * 添加购物车
     * @return
     */
    Long addCar();

}
